package com.itheima.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.itheima.pojo.Checkgroup;
import com.itheima.vo.CheckgroupVO;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

public interface CheckgroupMapper extends BaseMapper<Checkgroup> {

    @Select("select cg.* from setmeal_group_t sg \n" +
            "left join checkgroup_t cg on sg.group_id = cg.id\n" +
            "where setmeal_id = #{setmealId}")
    List<CheckgroupVO> findBySetmealId(@Param("setmealId") Long setmealId);

}
